#import <UIKit/UIKit.h>
#import "SFUConstants.h"

/**
 * A GraphicsUtilities is an object representing the helper
 * graphics methods created for convenience sake.
 *
 * @author      James Lin
 * @version     2.0.2
 * @since       1.0.6
 */
@interface GraphicsUtilities : NSObject

/**
 * Retrieve the shared instance of the graphics utilities.
 *
 * @return  the shared instance of GraphicsUtilities
 */
+ (GraphicsUtilities*)sharedUtilities;

/**
 * Display an overlay prompt with given message.
 *
 * Animates downwards from the top of the screen.
 * Supplying a colour is optional and will produce a
 * default dark red background for the prompt.
 *
 * @param message  the message to show on the prompt
 * @param view     the view in which this prompt is shown
 * @param color    color of the background of the prompt, if supplied;
 *                 dark red, if nil.
 */
+ (void)showPrompt:(NSString*)message 
			inView:(UIView*)view 
		 withColor:(UIColor*)color;

/**
 * Display an overlay prompt with given message and custom height.
 *
 * Animates downwards from the top of the screen.
 * Supplying a colour is optional and will produce a
 * default dark red background for the prompt.
 *
 * @param message  the message to show on the prompt
 * @param view     the view in which this prompt is shown
 * @param color    color of the background of the prompt, if supplied;
 *                 dark red, if nil.
 * @param height   height of the prompt
 */
+ (void)showPrompt:(NSString*)message 
			inView:(UIView*)view 
		 withColor:(UIColor*)color 
		 andHeight:(CGFloat)height;

/**
 * Change the message of the prompt.
 *
 * Only effective after calling showPrompt:inView:.
 * Does nothing if no prompt shown.
 *
 * @param message  the new message to which to change the prompt
 */
+ (void)changePrompt:(NSString*)message;

/**
 * Hides the overlay prompt.
 *
 * Only effective after calling showPrompt:inView:.
 * Does nothing if no prompt shown.
 *
 * @param isAnimated  whether to animate the prompt's exit procedure
 */
+ (void)hidePromptAnimated:(BOOL)isAnimated;

/**
 * Display an activity indicator pop-up.
 *
 * @param message  message of the activity indicator pop-up
 */
+ (void)displayActivityIndicatorWithMsg:(NSString*)message;

/**
 * Hides the activity indicator pop-up.
 *
 * Does nothing if no activity indicator shown.
 */
+ (void)hideActivityIndicator;

/**
 * Display an alert pop-up.
 *
 * @param title    title of the alert pop-up
 * @param message  message of the alert pop-up
 */
+ (void)displayAlertWithTitle:(NSString*)title 
					  message:(NSString*)message;

/**
 * Display a positionable alert pop-up.
 *
 * @param title    title of the alert pop-up
 * @param message  message of the alert pop-up
 * @param xShift   number of pixels to horizontally transform the pop-up
 * @param yShift   number of pixels to vertically transform the pop-up
 */
+ (void)displayShiftedAlertWithTitle:(NSString*)title 
							 message:(NSString*)message 
						  horizShift:(CGFloat)xShift 
						   vertShift:(CGFloat)yShift;

/**
 * Display a confirmation pop-up.
 *
 * @param title     title of the confirmation pop-up
 * @param message   message of the confirmation pop-up
 * @param tag       the tag identifier for the confirmation pop-up
 * @param delegate  delegate handling response to the confirmation pop-up
 */
+ (void)displayConfirmationWithTitle:(NSString*)title 
							 message:(NSString*)message 
								 tag:(NSUInteger)tag
							delegate:(id<UIAlertViewDelegate>)delegate;

/**
 * Create a UILabel resized to its text content.
 *
 * @param labelContent  the text to place in the label
 * @param font          the font type and size of the text
 * @param textColor     the color of the text
 * @param hPadding      horizontal padding on the left and right sides of the label
 * @param vPadding      vertical padding on the top and bottom sides of the label
 * @param height        height of the label
 * @return              a newly allocated UILabel with the specified text and style
 */
+ (UILabel*)getLabelResizedToText:(NSString*)labelContent 
							 font:(UIFont*)font 
						textColor:(UIColor*)textColor 
						 hPadding:(CGFloat)hPadding 
						 vPadding:(CGFloat)vPadding 
						   height:(CGFloat)height;

@end
